<template>
  <div id='goodList' class='goodList'>

    <good-list-item v-for="(item,index) in goods" :key="index" :goodsItem='item' />

  </div>
</template>

<script>
  import GoodListItem from "./goodListItem.vue"
  export default {
    name: 'goodList',
    props: { // 父辈向子辈传参
      goods: {
        type: [Object, Array],
        default () {
          return []
        }
      }
    },
    components: { // 组件的引用
      GoodListItem

    },
    data() {
      return {

      }
    },
    methods: { // 方法

    },
    created() { // 实例被创建之后执行代码

    },
    computed: { // 计算属性

    },
    mounted() { // 页面进入时加载内容

    },
    watch: { // 监测变化

    }
  }

</script>
<style scoped>
  .goodList {
    display: flex;

    flex-wrap: wrap;
  }

</style>
